// import './assets/main.css'


// 样式初始化
import './assets/less/index.less'


import { createApp } from 'vue'
// 引入axios和mockjs
import axios from 'axios'
// 路由
import router from './router/index.js'

import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// element plus 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import App from './App.vue'

// 全局引入封装的请求
import api from './api/api.js'

const pinia =createPinia()



const app=createApp(App)

// 引入mock
import './api/mock.js'


// element plus 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 将axios挂载到vue应用实例上
app.config.globalProperties.$axios=axios

app.config.globalProperties.$api=api

pinia.use(piniaPluginPersistedstate)
app.use(pinia)

app.use(router)

app.mount('#app')
